﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using bxml.betterxml.xelement;

namespace bxml.betterxml
{
   
public class BetterXmlException : Exception {
	
	//private static final long serialVersionUID = 1L;

	public BetterXmlException(String message) 
        :base(message)
    {
		
	}
	
	public BetterXmlException(Exception ex) 
        :base("BetterXmlException", ex)
    {
		
	}

	public static BetterXmlException CannotLoadFile(FileInfo file) {
		return new BetterXmlException("Cannot load file for parsing: " + file.FullName);
	}
	
    //public static BetterXmlException ParserInitializationError(ParserConfigurationException pce){
    //    return new BetterXmlException("ParserConfigurationError at Parser Initialization;" +
    //                    pce.getMessage());
    //}
	
	public static BetterXmlException SettingSelfAsAncestor(XNode node) {
		return new BetterXmlException("Data Structure Error: making an element its own ancestor.");
	}
	
}
}
